		<script>
function doubleclick(el, code) {
            if (el.getAttribute("data-dblclick") == null) {
                el.setAttribute("data-dblclick", 1);
                setTimeout(function () {
                    if (el.getAttribute("data-dblclick") == 1) {
                 //       onsingle();
                    }
                    el.removeAttribute("data-dblclick");
                }, 300);
            } else {
                el.removeAttribute("data-dblclick");
                location.href='{$smarty.const.base_admin}?act=add-menu&code='+code;
            }
        }
</script>
<!-- BEGIN PAGE CONTAINER-->
         <div class="container-fluid">
            <!-- BEGIN PAGE HEADER-->   
            <div class="row-fluid">
               <div class="span12">
                   <!-- BEGIN THEME CUSTOMIZER-->
                   <div id="theme-change" class="hidden-phone">
                       <i class="icon-cogs"></i>
                        <span class="settings">
                            <span class="text">Theme Color:</span>
                            <span class="colors">
                                <span class="color-default" data-style="default"></span>
                                <span class="color-green" data-style="green"></span>
                                <span class="color-gray" data-style="gray"></span>
                                <span class="color-purple" data-style="purple"></span>
                                <span class="color-red" data-style="red"></span>
                            </span>
                        </span>
                   </div>
                   <!-- END THEME CUSTOMIZER-->
                  <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                   <h3 class="page-title">
                     {$nameact}
                   </h3>
                  
                   <!-- END PAGE TITLE & BREADCRUMB-->
               </div>
            </div>
            <!-- END PAGE HEADER-->
            <!-- BEGIN ADVANCED TABLE widget-->
            <div class="row-fluid">
                <div class="span12">
                <!-- BEGIN EXAMPLE TABLE widget-->
                <div class="widget red">
                    <div class="widget-title">
                        <h4><i class="icon-reorder"></i> {$nameact}</h4>
                            <span class="tools">
                                <a href="javascript:;" class="icon-chevron-down"></a>
                                <a href="javascript:;" class="icon-remove"></a>
                            </span>
                    </div>
					{$msg}
                    <div class="widget-body">
					<form method=post>
					<div class="clearfix">
                                     <div class="btn-group">
                                         <button type="button" id="editable-sample_new" class="btn green" onclick="location.href='{$smarty.const.base_admin}?act=add-menu'">
                                             Thêm menu <i class="icon-plus"></i>
                                         </button>
                                     </div>
									 <div class="btn-group pull-right">
                                         <button class="btn green" type="submit" name="bsort" value="sort" ><i class="icon-save"></i> Lưu sắp xếp
                                         </button>
                                     </div>
                                 </div>
								 <div class="space15"></div>
                        <table class="table table-striped table-bordered" id="sample_1">
                            <thead>
                            <tr>
                                <th width=60%></th>
								<th width=10%>Type</th>
								<th width=10%>Hiện trên Home</th>
								<th width=10%>Hiện trên Menu</th>
								<th width=10%>Thứ Tự</th>
                            </tr>
                            </thead>
                            <tbody>
							{foreach from=$menu[0] item=mn}
                            <tr class="odd gradeX"  onclick="doubleclick(this,'{$mn.code}');">
                                <td><a href="{$smarty.const.base_admin}?act=add-menu&code={$mn.code}"><i class="icon-folder-close"></i> {$mn.name}</a></td>
                                <td >{$mn.type}</td>
								<td>{$mn.is_showhome}</td>
								<td>{$mn.is_is_active}</td>
								<td><input class="small" type=text name=sort[{$mn.id}] size=2 value='{$mn.sort}' style="margin-left:0px;width:90%"></td>
                            </tr>
							{foreach from=$menu[$mn.id] item=sub1_mn}
							<tr class="odd gradeX">
								<td><a href="{$smarty.const.base_admin}?act=add-menu&code={$sub1_mn.code}" style="padding-left:30px;"><i class="icon-file-text-alt"></i> {$sub1_mn.name}</a></td>
								<td >{$mn.type}</td>
								<td>{$mn.is_showhome}</td>
								<td>{$mn.is_is_active}</td>
								<td><input class="small" type=text name=sort[{$mn.id}] size=2 value='{$mn.sort}' style="margin-left:0px;width:90%"></td>
							</tr>
							{foreach from=$menu[$sub1_mn.id] item=sub2_mn}
							<tr class="odd gradeX">
								<td><a href="{$smarty.const.base_admin}?act=add-menu&code={$sub2_mn.code}" style="padding-left:60px;">{$sub2_mn.name}</a></td>
								<td >{$mn.type}</td>
								<td>{$mn.is_showhome}</td>
								<td>{$mn.is_is_active}</td>
								<td><input class="small" type=text name=sort[{$mn.id}] size=2 value='{$mn.sort}' style="margin-left:0px;width:90%"></td>
							</tr>
							{/foreach}
							{/foreach}
							{/foreach}
                            </tbody>
                        </table>
                    </div>
                </div>
                <!-- END EXAMPLE TABLE widget-->
                </div>
            </div>

            <!-- END ADVANCED TABLE widget-->
         </div>
         <!-- END PAGE CONTAINER-->